package com.martian.mapper;

import com.martian.pojo.dto.AllUsers;
import com.martian.pojo.dto.HotUserDto;
import com.martian.pojo.dto.UserLoginDto;
import com.martian.pojo.dto.UserRatingHistory;
import com.martian.pojo.entity.MovieCollect;
import com.martian.pojo.entity.User;
import com.martian.pojo.entity.UserStatistic;
import com.martian.pojo.form.DeepCrossingInputForm;
import com.martian.pojo.form.NeuralCfInputForm;

import java.util.List;

public interface UserMapper {
    UserLoginDto selectByName(String userName);

    List<UserRatingHistory> getWatchHistory(Integer userId);

    int selectMovieCollect(MovieCollect movieCollect);

    void insertMovieCollect(MovieCollect movieCollect);

    void deleteMovieCollect(MovieCollect movieCollect);

    List<UserRatingHistory> selectAllMovieCollect(Integer userId);

    List<UserRatingHistory> selectAllMovieRating(Integer userId);

    void insertNewUser(String userName,String userPwd, String userSalt,Integer userIsAlive);

    UserStatistic selectUserStatistics(Integer userId);

    NeuralCfInputForm selectNeuralCFInput(Integer userId);
    DeepCrossingInputForm selectDeepCrossingInput(Integer userId);

    DeepCrossingInputForm selectWideAndDeepInput(Integer userId);

    Integer selectConfig();

    List<HotUserDto> selectHotUsers();

    List<AllUsers> selectAllUsers();

    void frozenUsers(List<Integer> frozenUserIds,Integer frozenTag);

    Integer getNumOfAllUsers();

    void insertUserStatistic(UserStatistic userStatistic);

    void updateUserStatistic(UserStatistic userStatistic);

    void updateUserStatisticRating(UserStatistic userStatistic);

    Double selectSumRating(Integer userId);

    UserStatistic selectUserAvgRatingAndStd(Integer userId);
}
